from django.db import models


class Cate(models.Model):
    name = models.CharField(max_length=20)


class Books(models.Model):
    name = models.CharField(max_length=20)
    price = models.IntegerField()
    cate = models.ForeignKey(Cate, on_delete=models.CASCADE, related_name='cate')
